package com.restaurantonlineorder.buyer.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * @author 熊宇
 * @date 2022/7/24 9:37
 * @description 商品状态 枚举类
 */
@Getter
public enum GoodsState {


    /**
     * 商品正在准备中
     */
    PREPARING(0, "正在准备中"),

    /**
     * 商品已发货
     */
    SHIPPED(1, "正在配送中"),

    /**
     * 商品已到达
     */
    ARRIVED(2, "已到达");

    @EnumValue
    private final int state;

    @JsonValue
    private final String stateName;

    GoodsState(int state, String stateName) {
        this.state = state;
        this.stateName = stateName;
    }
}
